<?php
    $sql = "SELECT * FROM tintuc";
    $result = DataProvider::ExecuteQuery($sql);
    $i = 1;
?>



<div class="row-fluid" width="1200px">
    <div class="span16">
        <div class="head">
            <div class="isw-sync"></div>
            <h1>Tin Tức</h1>
            <ul class="buttons" onclick="location = 'index.php?tintuc=3&id=<?php echo $row["MaTinTuc"] ?>';">
                <li>
                    <div>
                        <button class="btn btn-info">Thêm</button>
                    </div>
                </li>
            </ul>
            <div class="clear"> </div>
        </div>
        <div class="block-fluid">
            <table cellpadding="0" cellspacing="0" width="100%" class="table listUsers">
                <tbody>
                    <?php
                        while($row = mysql_fetch_array($result))
                        {
                    ?>

                    <tr>
                        <td width="20%">
                            <a  class="user">Tiêu Đề: </a><br><br>
                            <?php echo $row["TieuDe"]; ?>

                        </td>
                        <td width="40%">
                            <a  class="user">Nội Dung: </a><br><br>
                            <?php echo $row["NoiDung"]; ?>

                        </td>

                        <td width="17%">
                            <span class="icon-minus-sign"></span> Tình trạng Tin Tức: "<?php echo $row["BiXoa"]; ?>"
                            <br>(0 là Bình Thường, 1 là Bị Xóa)<br><br>

                            <span class="icon-minus-sign"></span> Trạng Thái Tin Tức:
                            "<?php echo $row["TrangThai"]; ?>"
                        </td>

                        <td width="13%">
                            <p class="info">
                            <button class="btn btn-primary" onclick="location = 'index.php?tintuc=1&id=<?php echo $row["MaTinTuc"] ?>';" type="button">Cập Nhật</button>
                            <button class="btn btn-danger" onclick="location = 'index.php?tintuc=2&id=<?php echo $row["MaTinTuc"] ?>';" type="button">Xóa</button>

                            </p>
                        </td>


                    </tr>

                    <?php
                        }
                    ?>
                </tbody>
            </table>
        </div>
    </div>

</div>

<div class="dr"><span></span></div>